package com.telit.communicate.constant;

import java.lang.reflect.Field;


/**
 * @author zhouyu
 * @description 待分发系统个数
 */
public enum SystemName {


    /**
     * 防火系统
     */
    FIREPROOF,
    /**
     * 林长制
     */
    FORESTCHIEF,
    /**
     * 自然保护地
     */
    NATURERESERVE;


    @Override
    public String toString() {
        return this.name();
    }

    public static SystemName getSystemName(String name) {
        switch (name) {
            case "FIREPROOF":
                return SystemName.FIREPROOF;
            case "FORESTCHIEF":
                return SystemName.FORESTCHIEF;
            case "NATURERESERVE":
                return SystemName.NATURERESERVE;
            default:
                return null;
        }
    }

    public static Field[] getFields() {
        return SystemName.class.getFields();
    }
}